import 'package:flutter/material.dart';

class EmptyWidget extends StatelessWidget {
  final String? image;
  final String? message;
final VoidCallback? onTap;
  const EmptyWidget({Key? key, this.image, this.message,  this.onTap}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return SizedBox(
      width: double.infinity,
      height: double.infinity,
      child: Center(
        child: Container(
          alignment: Alignment.center,
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[
              Image.asset(image ?? "assets/images/common_empty.png"),
              Container(
                margin: const EdgeInsets.fromLTRB(0, 10, 0, 0),
                child: Text(message ?? "暂无数据",
                    style: const TextStyle(
                      color: Colors.grey,
                      fontWeight: FontWeight.w600,
                    )),
              )
            ],
          ),
        ),
      ),
    );
  }
}
